package cc.catface.dao.biz.app.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@ApiModel
public class ArticleCommentOUTDTO {
    @ApiModelProperty(value = "评论ID")
    private long commentId;
    @ApiModelProperty(value = "昵称")
    private String userName;
    @ApiModelProperty(value = "评论内容")
    private String content;
    @ApiModelProperty(value = "图片评论")
    private String imageUrl;
    @ApiModelProperty(value = "地理位置")
    private String address;
    @ApiModelProperty(value = "时间[yyyy-MM-dd HH:mm:ss]")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;
    @ApiModelProperty(value = "回复")
    private List<Repay> repays;

    @Data
    @ApiModel
    public static class Repay {
        @ApiModelProperty(value = "评论回复ID")
        private long repayId;
        @ApiModelProperty(value = "昵称")
        private String userName;
        @ApiModelProperty(value = "评论内容")
        private String content;
        @ApiModelProperty(value = "地理位置")
        private String address;
        @ApiModelProperty(value = "时间[yyyy-MM-dd HH:mm:ss]")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date createdTime;
    }
}
